<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions">
<h:head>
	<script src="../js/jquery.maskMoney.js" type="text/javascript"></script>
	<script type="text/javascript">
		//<![CDATA[
		//debe usarse los \\:  en lugar de : en los selectores de JQuery
		$(document).ready(function() {
			wizardSetCurrentPageStyle('form_wizard:economicData');//#form_economic_data\\:
			$(".currency").maskMoney({
				showSymbol : true,
				symbol : "$",
				decimal : ",",
				thousands : ".",
				precision : "0"
			});
		});
		//]]>
	</script>
</h:head>
<h:body>
	<!-- 



lbl.owner.economic_data.credit

 -->
	<h:form id="form_economic_data">
		<h2>
			<h:outputLabel value="#{i18n['lbl.owner.economic_data.title']}" />
		</h2>
		<br />
		<div class="clearfix common-panel">
			<div class="clearfix text-align-left">
				<h:outputLabel value="#{i18n['lbl.owner.economic_data.ingress']}" />
				<span class="required">*</span>
			</div>
			<div class="clearfix text-align-left">
				<p:inputText
					value="#{aSession.selectedRuatRegister.totalFamilyIncome}"
					styleClass="currency" required="true"
					requiredMessage="#{i18n['cmpnt.required']}" />
			</div>
			<br />
			<div class="clearfix text-align-left">
				<h:outputLabel
					value="#{i18n['lbl.owner.economic_data.ingress_dependence']}" />
				<span class="required">*</span>
			</div>
			<div class="clearfix text-align-left">
				<p:inputText styleClass="input-number ui-width-xxs"
					value="#{aSession.selectedRuatRegister.peopleDepend}"
					required="true" requiredMessage="#{i18n['cmpnt.required']}">
					<pe:keyFilter mask="int" />
				</p:inputText>
			</div>
			<br />
			<div class="clearfix text-align-left">
				<h:outputLabel
					value="#{i18n['lbl.owner.economic_data.ingess_familiar']}" />
				<span class="required">*</span>
			</div>
			<div class="clearfix text-align-left">
				<p:inputText value="#{aSession.selectedRuatRegister.farmingIncome}"
					styleClass="currency" required="true"
					requiredMessage="#{i18n['cmpnt.required']}" />
			</div>
			<br />
			<div class="ui-form-row-2col clearfix">
				<div class="ui-form-col">
					<div class="clearfix text-align-left">
						<h:outputLabel value="#{i18n['lbl.owner.economic_data.credit']}" />
					</div>
					<div class="clearfix text-align-left">
						<p:selectOneRadio
							value="#{aSession.selectedRuatRegister.usingCurrentCredit}"
							id="radioUsingCurrentCredit">
							<f:selectItem itemLabel="Si" itemValue="1">
							</f:selectItem>
							<f:selectItem itemLabel="No" itemValue="2">
							</f:selectItem>
							<f:ajax event="click" render="originOfCreditCmb" />
						</p:selectOneRadio>
					</div>
				</div>
					<div class="ui-form-col">
						<div class="clearfix text-align-left">
							<h:outputLabel
								value="#{i18n['lbl.owner.economic_data.credit_origin']}" />
						</div>
						<div class="clearfix text-align-left">
							<p:selectOneMenu
								value="#{aSession.selectedRuatRegister.originOfCredit}"
								id="originOfCreditCmb"
								required="#{aSession.selectedRuatRegister.usingCurrentCredit==1}"
								requiredMessage="#{i18n['cmpnt.required']}" disabled="#{aSession.selectedRuatRegister.usingCurrentCredit!=1}">
								<f:selectItem itemLabel="#{i18n['cmpnt.type_or_select']}"
									itemValue="" noSelectionOption="true" />
								<f:selectItems value="#{originOfCreditCmb.parameterDTO.options}" />
								<f:selectItem itemLabel="#{i18n['cmpnt.other']}"
									itemValue="3"  />								
							</p:selectOneMenu>
						</div>
					</div>

			</div>

		</div>
		<div class="buttons-container clearfix text-align-right">
			<p:commandButton value="#{i18n['lbl.flow_button.cancel']}"
				styleClass="ui-flowbutton"
				oncomplete="currentPage('list_owner_data.xhtml')"
				actionListener="#{stepByStepController.cancelRuatRegister}" />
			<p:commandButton value="#{i18n['lbl.flow_button.back']}"
				oncomplete="setCurrentPageStyle(xhr, status, args,this)"
				styleClass="ui-flowbutton" update="form_economic_data"
				actionListener="#{stepByStepController.viewContactData}" />
			<p:commandButton value="#{i18n['lbl.flow_button.save_and_next']}"
				oncomplete="setCurrentPageStyle(xhr, status, args,this)"
				styleClass="ui-flowbutton" validateClient="true"
				update="form_economic_data"
				actionListener="#{stepByStepController.viewInnovationData}"
				id="savenext" />
		</div>
		<p:blockUI block="savenext" trigger="savenext" />
	</h:form>
</h:body>
<script type="text/javascript">
	//<![CDATA[
	//debe usarse los \\:  en lugar de : en los selectores de JQuery
	//]]>
</script>
</html>